import "./assets/css/main.css";
import { createApp } from "vue";
import { createPinia } from "pinia";
import { useCounterStore } from "@/stores/counter";
import App from "./App.vue";
import router from "./router";
import Dialog from "./components/dialog.vue";
import stcBotton from "./components/stc-botton.vue";

const app = createApp(App);

// register components
app.component("stcBotton", stcBotton);
app.component("Dialog", Dialog);
app.use(createPinia());
app.use(router);
// 静态资源图片
app.config.globalProperties.$baseImgUrl =
  "http://b1740j1440.yicp.fun:47231/output/";

const counterStore = useCounterStore();
counterStore.loadConfig();

document.addEventListener("contextmenu", function (e) {
  e.preventDefault();
  return false;
});

document.addEventListener("selectstart", function (e) {
  e.preventDefault();
  return false;
});

app.mount("#app");
